<div class="main-container month-plan-content" #wrap>
    <div class="content-top-bar">
        <div class="search-box">
            <nz-form-item class="fileItem">
                <nz-form-label>年份</nz-form-label>
                <nz-year-picker [(ngModel)]="year" (ngModelChange)="getGridData(true)">
                </nz-year-picker>
            </nz-form-item>
            <nz-form-item class="fileItem">
                <nz-form-label>月份</nz-form-label>
                <nz-select nzAllowClear [(ngModel)]="monthSelection" (ngModelChange)="getGridData(true)">
                    <nz-option nzValue="" nzLabel="全部"></nz-option>
                    <nz-option nzValue="4" nzLabel="4月"></nz-option>
                    <nz-option nzValue="5" nzLabel="5月"></nz-option>
                    <nz-option nzValue="6" nzLabel="6月"></nz-option>
                    <nz-option nzValue="7" nzLabel="7月"></nz-option>
                    <nz-option nzValue="8" nzLabel="8月"></nz-option>
                    <nz-option nzValue="9" nzLabel="9月"></nz-option>
                    <nz-option nzValue="d" nzLabel="冬灌"></nz-option>
                </nz-select>
            </nz-form-item>
            <button nz-button nzType="default" (click)="reset()">重置</button>
        </div>
    </div>
    <div class="table-btn-group dark-blue-table">
        <nz-table #monthPlan nzSize="middle" nzBordered 
        [nzData]="monthPlanList" nzShowSizeChanger [nzFrontPagination]="false" 
        [nzLoading]="loading" [nzTotal]="total" [nzScroll]="scrollConfig" 
        [(nzPageIndex)]="pageNum" [(nzPageSize)]="pageSize" 
        (nzPageIndexChange)="getGridData()" (nzPageSizeChange)="getGridData(true)">
            <thead>
                <tr>
                    <th style="width: 75px;">序号</th>
                    <th>计划名称</th>
                    <th style="width: 200px;">时间</th>
                    <th style="width: 150px;">状态</th>
                    <th style="width: 200px;">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let row of monthPlan.data;index as i">
                    <td style="width: 75px;">{{i + 1}}</td>
                    <td>{{row.name}}</td>
                    <td style="width: 200px;">{{row.cycleName}}</td>
                    <td style="width: 150px;">{{row.stateName}}</td>
                    <td style="width: 200px;" class="table-btn">
                        <a (click)="onEdit('view',row)">查看</a>
                        <a (click)="onEdit('edit',row)" *ngIf="row.state==='0'">修改</a>
                        <a (click)="exportFile(row)">导出</a>
                    </td>
                </tr>
            </tbody>
        </nz-table>
    </div>
</div>